#include <GUICommandManager.h>
Public Member Functions | |
| GUICommandManager (int nUndoLevel=100) | |
| ~GUICommandManager () | |
| bool | CanUndo () const |
| bool | CanRedo () const |
| int | getUndoLevel () const |
| void | setUndoLevel (int newValue) |
| bool | IsDirty () const |
| Command * | getLastUndoCommand () const |
| Command * | getLastRedoCommand () const |
| void | DoCommand (Command *pCommand) |
| void | Undo () |
| void | Redo () |
| void | Clear () |
| void | SetClean () |
| void | AddUndo (Command *pCommand) |
| void | AddRedo (Command *pCommand) |
| void | ClearUndoList () |
| void | ClearRedoList () |
| void | ClearCommandList (CommandList *pList) |
Private Types | |
| typedef list< Command * > | CommandList |
Private Attributes | |
| CommandList | m_undoList |
| CommandList | m_redoList |
| int | m_nUndoLevel |
| int | m_nCleanCount |
|
|
|
|
|
A constructor. Initializes m_nUndoLevel and m_nCleanCount variables.
|
|
|
A destructor. Clears m_undoList and m_redoList. |
|
|
pushes a Command object to the m_redoList.
|
|
|
pushes a Command object to the m_undoList.
|
|
|
a constant member method showing if redo operation can be performed.
|
|
|
a constant member method showing if undo operation can be performed.
|
|
|
clears m_undoList and m_redoList. |
|
|
clears the given list.
|
|
|
clears m_redoList. |
|
|
clears m_undoList. |
|
|
execute the command and add it to undo list if succeeded.
|
|
|
a constant member method returning the first redoable command object.
|
|
|
a constant member method returning the last performed command object.
|
|
|
a constant member method returning the maximum undo level.
|
|
|
a constant member method showing if any command operation is performed.
|
|
|
performs redo operation to the first redoable command object. |
|
|
set m_nCleanCount as 0. |
|
|
set the maximum undo level.
|
|
|
performs undo operation to the last performed command operation. |
|
|
a private variable. It holds if any command operation is performed. |
|
|
a private variable. It holds maximum size of the m_undoList. |
|
|
a private list of Command pointers. It holds the command objects on which redo operations can be performed. |
|
|
a private list of Command pointers. It holds the command objects on which undo operations can be performed. |
1.4.6-NO